package com.qc.wintrax.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.qc.wintrax.BaseActivity;
import com.qc.wintrax.R;
import com.qc.wintrax.widget.CustomActionBar;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SignAndSigterActivity extends BaseActivity {


    @Bind(R.id.title_home)
    CustomActionBar titleHome;
    @Bind(R.id.phone_btn)
    Button phoneBtn;
    @Bind(R.id.weixin_btn)
    Button weixinBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sign_and_sigter);
        ButterKnife.bind(this);
        setBar();
    }

    public void setBar() {
        titleHome.setRightImageVisibility(View.GONE);
        titleHome.setRightTextView("注册");
        titleHome.setTextViewVisibility(View.GONE);
        titleHome.setLeftImageResource(R.mipmap.back_icon);
        titleHome.setOnRightTextClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(context, SigterActivity.class);
                startActivity(intent);
            }
        });
        titleHome.setOnLeftImageClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @OnClick({R.id.phone_btn, R.id.weixin_btn})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.phone_btn:
                Intent intent = new Intent(context, SignInActivity.class);
                startActivity(intent);
                break;
            case R.id.weixin_btn:
                break;
        }
    }

}
